extern crate unmp_id;

use unmp_id::*;

#[test]
fn test() {
    let id0 = SpecialId::new([0, 0]);
    let id0_raw = id0.id();
    assert_eq!(id0_raw.len(), 3);
    assert_eq!(id0_raw, ID_PARENT);
    let id1 = SpecialId::new([1, 1]);
    let id1_raw = id1.id();
    assert_eq!(id1_raw.len(), 3);

    let id0_tmp = SpecialId::try_from(&id0_raw).unwrap();
    assert_eq!(id0, id0_tmp);
    let id1_tmp = SpecialId::try_from(&id1_raw).unwrap();
    assert_eq!(id1, id1_tmp);
}
